// Loader
var loader = document.createElement('div');
loader.className = 'loader';
// Panorama display
var Container = document.getElementById('container');
$(".homelist li").on("click", function() {
	var Url = $(this).find("img").attr("src");
	showPsv(Url);
});
showPsv("../images/sun.jpg");

function showPsv(url) {
	PSV = new PhotoSphereViewer({
		// Path to the panorama
		panorama: url,

		// Container
		container: Container,

		// Deactivate the animation
		time_anim: false,

		// Display the navigation bar
		navbar: true,

		// Resize the panorama
		size: {
			width: '100%',
			height: '100%'
		},

		// HTML loader
		loading_html: loader,

		// Disable smooth moves to test faster
		smooth_user_moves: false
	});
}